﻿// ***********************************************************************
// Assembly         : DonNicky.Common
// Author           : donnicky
// Created          : 11-19-2012
//
// Last Modified By : donnicky
// Last Modified On : 11-25-2012
// ***********************************************************************

using System;

namespace DonNicky.Common
{
    /// <summary>
    /// Interface IFactory
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface IFactory<T>
    {
        /// <summary>
        /// Creates the instance.
        /// </summary>
        /// <returns>Instance of <typeparamref name="T" />.</returns>
        T CreateInstance();

        /// <summary>
        /// Creates the instance with initialization.
        /// </summary>
        /// <param name="initAction">The init action.</param>
        /// <returns>Instance of <typeparamref name="T" />.</returns>
        T CreateInstance(Action<T> initAction);
    }
}
